/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sim_test;


import java.awt.Image;
import java.awt.image.BufferedImage;
import pathfinder.*;


/**
 *
 * @author Administrator
 */
public class Sim_Map {
    
    private BufferedImage backgroundImage;
    private Tile[][] tilesInMap;
    
    public Sim_Map(BufferedImage bimg)
    {
        backgroundImage = bimg;
        getTilesWithDirections();
    }
    
    private void getTilesWithDirections()
    {
        Pathfinder pf = new Pathfinder();
        tilesInMap = pf.getTilesWithTraversability();
    }
    
    public Image getBackgroundImage()
    {
        return backgroundImage;
    }
    
    public byte getDirecForDest(int startX, int startY, int destX, int destY)
    {
        return tilesInMap[startX][startY].getDirectionForDestination(destX, destY);
    }
    

    
    
            
            
   

}
